import request from '@/utils/request'

// 创建隐患信息
export function createHtHiddentrouble(data) {
  return request({
    url: '/biz/ht-hiddentrouble/create',
    method: 'post',
    data: data
  })
}

// 更新隐患信息
export function updateHtHiddentrouble(data) {
  return request({
    url: '/biz/ht-hiddentrouble/update',
    method: 'put',
    data: data
  })
}

// 删除隐患信息
export function deleteHtHiddentrouble(id) {
  return request({
    url: '/biz/ht-hiddentrouble/delete?id=' + id,
    method: 'delete'
  })
}

// 获得隐患信息
export function getHtHiddentrouble(id) {
  return request({
    url: '/biz/ht-hiddentrouble/get?id=' + id,
    method: 'get'
  })
}

// 获得隐患信息分页
export function getHtHiddentroublePage(query) {
  return request({
    url: '/biz/ht-hiddentrouble/page',
    method: 'get',
    params: query
  })
}

// 导出隐患信息 Excel
export function exportHtHiddentroubleExcel(query) {
  return request({
    url: '/biz/ht-hiddentrouble/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
